<?php

require_once("function.php");

$employee = $_REQUEST['employee'];
$func = $_REQUEST['func'];

$con = connectToDB();

if($func == "planholder")
{
	echo "<select name=\"planholder\" id=\"planholder\">";
	$result = mysql_query("select * from planholder where Account_executive = '$employee'", $con);
	
	while($row = mysql_fetch_array($result))
	{
		echo "<option value=\"".$row['Policy_no']."\">".$row['First_name']." ".$row['Last_name']."</option>";
	}
	echo "</select>";
}
else
{
	echo "<select name=\"new_employee\" id=\"new_employee\">";
	$result2 = mysql_query("select * from employee where Emp_no <> '$employee' AND Pos = 'Regular'", $con);

	while($row = mysql_fetch_array($result2))
	{
		echo "<option value=\"".$row['Emp_no']."\">".$row['First_name']." ".$row['Last_name']."</option>";
	}
	echo "</select>";
}

mysql_close($con);
?>